#pragma once

#include "Sprite.h"

class Animation: public Sprite {
public: 
	Animation(); 
	Animation(const std::string &path, int xPos, int yPos, int wPos, int hPos, int xSrc, int ySrc, int wSrc, int hSrc, int offsetSrc, int frames, int fps, bool loop, bool horz);
	~Animation();
	void Update(float dt);
	void SetAnimation(int xSrc, int ySrc, int wSrc, int hSrc, int offsetSrc, int frames, int fps, bool loop, bool horz);
protected: 
	bool isLooping;
	int nbFrames;
	int currentFrame;
	float frameRate;
	float currentTime;
	SDL_Rect* anim;
};

